<ul class="dux-tab uk-clearfix">
    <li class="">
        <a href="{url()}">收货地址</a>
    </li>
    <li class="active">
        <a href="{url('add')}">添加地址</a>
    </li>

</ul>

<div class="dux-tab-body uk-padding">
    <form class="dux-form uk-form  uk-form-horizontal" action="{url()}" method="post" data-dux="form-bind" data-callback="address">

        <div class="uk-form-group">
            <label class="uk-form-label">姓名</label>
            <div class="uk-form-controls uk-form-controls-text">
                <input type="text" placeholder="收件人姓名" name="name" value="{$info.name}">
            </div>
        </div>
        <div class="uk-form-group">
            <label class="uk-form-label">电话</label>
            <div class="uk-form-controls uk-form-controls-text">
                <input type="text" placeholder="收件人电话" name="tel" value="{$info.tel}">
            </div>
        </div>
        <div class="uk-form-group">
            <label class="uk-form-label">地区</label>
            <div class="uk-form-controls" data-dux="form-location">
                <div class="uk-grid uk-child-width-expand">
                    <div>
                        <select name="province" data-province="{$info.province}"></select>
                    </div>
                    <div>
                        <select name="city" data-city="{$info.city}"></select>
                    </div>
                    <div>
                        <select name="region" data-district="{$info.region}"></select>
                    </div>
                </div>
            </div>
        </div>
        <div class="uk-form-group">
            <label class="uk-form-label">地址</label>
            <div class="uk-form-controls uk-form-controls-text">
                <input type="text" placeholder="详细地址到门牌号" name="address" value="{$info.address}">
            </div>
        </div>
        <div class="uk-form-group">
            <label class="uk-form-label">邮编</label>
            <div class="uk-form-controls uk-form-controls-text">
                <input type="text" placeholder="邮政编码" name="zip" value="{$info.zip}">
            </div>
        </div>
        <div class="uk-form-group">
            <label class="uk-form-label">默认</label>
            <div class="uk-form-controls uk-form-controls-text">
                <div class="uk-margin-small-top">
                    <label>
                        <!--if{$info.default}-->
                        <input type="checkbox" name="default" value="1" checked>
                        <!--{else}-->
                        <input type="checkbox" name="default" value="1">
                        <!--{/if}-->
                        (勾选设置为默认地址)
                    </label>
                </div>
            </div>
        </div>

        <div class="uk-form-group">
            <div class="uk-form-controls uk-form-controls-text">
                <input name="add_id" value="{$info.add_id}" type="hidden">
                <button type="submit" class="uk-button uk-button-primary">保存地址</button>
            </div>
        </div>


    </form>
</div>

<script>
    Do('base', function () {
        window.address = function (msg, url) {
            window.location.href = url;
        }
    });
</script>